//编写获取指定长度的随机字符串，可以指定随机字符序列
const arr=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
//定义空字符串
let str=''

//随机字符串
function random(size){
    for(let i=0;i<size;i++){
        let arr1=arr[Math.floor(Math.random()*arr.length)]
        str+=arr1
    }
    console.log(str)
}

random(5)